#! /usr/bin/env python
# -*- coding: utf-8 -*-
'''
@todo
@Author : sunp
@Date :2021/11/27
'''

from com.dtmilano.android.viewclient import ViewClient
device,serialno = ViewClient.connectToDeviceOrExit()
viewClient = ViewClient(device = device, serialno = serialno)
# viewClient.touch(540,1600)
# sleep = viewClient.findViewWithText(u'睡觉赚金币')
# sleep.touch()
# device.press('KEYCODE_BACK')
# viewClient.device.press('KEYCODE_BACK')
# view = viewClient.findViewWithText(u'吃饭补贴')
# view.touch()
# viewClient.dump(5)
# viewClient.touch(x = 540, y = 2010)
# viewClient.touch(540,1680)
# RecyclerView = viewClient.findViewWithAttribute(
#     'class',
#     u'androidx.recyclerview.widget.RecyclerView')
# textView = RecyclerView.children[1]
# print(u'正在阅读{ %s }...' %textView.getText())
# viewClient.dump()
# view = viewClient.findViewWithText(u'开宝箱得金币')
# print(view)
# viewClient.swipe(startX=500,startY=2000,endX=500,endY=1000)
viewClient.touch(x = 925, y = 1935)